package com.fuxi.cloud.desreport.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/**
 * JmReportDataSource
 *
 * @Author: 扫地僧
 * @CreateTime: 2021-05-03
 */
public class JmReportDataSource {
    private String id;
    @Excel(
            name = "数据源编码",
            width = 15.0D
    )
    private String code;
    @Excel(
            name = "数据源名称",
            width = 15.0D
    )
    private String name;
    @Excel(
            name = "报表id",
            width = 15.0D
    )
    private String reportId;
    @Excel(
            name = "备注",
            width = 15.0D
    )
    private String remark;
    @Excel(
            name = "数据库类型",
            width = 15.0D,
            dicCode = "database_type"
    )
    private String dbType;
    @Excel(
            name = "驱动类",
            width = 15.0D
    )
    private String dbDriver;
    @Excel(
            name = "数据源地址",
            width = 15.0D
    )
    private String dbUrl;
    @Excel(
            name = "用户名",
            width = 15.0D
    )
    private String dbUsername;
    @Excel(
            name = "密码",
            width = 15.0D
    )
    private String dbPassword;
    private String createBy;
    @JsonFormat(
            timezone = "GMT+8",
            pattern = "yyyy-MM-dd HH:mm:ss"
    )
    @DateTimeFormat(
            pattern = "yyyy-MM-dd HH:mm:ss"
    )
    private Date createTime;
    private String updateBy;
    @JsonFormat(
            timezone = "GMT+8",
            pattern = "yyyy-MM-dd HH:mm:ss"
    )
    @DateTimeFormat(
            pattern = "yyyy-MM-dd HH:mm:ss"
    )
    private Date updateTime;

    public JmReportDataSource() {
    }

    public String getId() {
        return this.id;
    }

    public String getCode() {
        return this.code;
    }

    public String getName() {
        return this.name;
    }

    public String getReportId() {
        return this.reportId;
    }

    public String getRemark() {
        return this.remark;
    }

    public String getDbType() {
        return this.dbType;
    }

    public String getDbDriver() {
        return this.dbDriver;
    }

    public String getDbUrl() {
        return this.dbUrl;
    }

    public String getDbUsername() {
        return this.dbUsername;
    }

    public String getDbPassword() {
        return this.dbPassword;
    }

    public String getCreateBy() {
        return this.createBy;
    }

    public Date getCreateTime() {
        return this.createTime;
    }

    public String getUpdateBy() {
        return this.updateBy;
    }

    public Date getUpdateTime() {
        return this.updateTime;
    }

    public JmReportDataSource setId(String id) {
        this.id = id;
        return this;
    }

    public JmReportDataSource setCode(String code) {
        this.code = code;
        return this;
    }

    public JmReportDataSource setName(String name) {
        this.name = name;
        return this;
    }

    public JmReportDataSource setReportId(String reportId) {
        this.reportId = reportId;
        return this;
    }

    public JmReportDataSource setRemark(String remark) {
        this.remark = remark;
        return this;
    }

    public JmReportDataSource setDbType(String dbType) {
        this.dbType = dbType;
        return this;
    }

    public JmReportDataSource setDbDriver(String dbDriver) {
        this.dbDriver = dbDriver;
        return this;
    }

    public JmReportDataSource setDbUrl(String dbUrl) {
        this.dbUrl = dbUrl;
        return this;
    }

    public JmReportDataSource setDbUsername(String dbUsername) {
        this.dbUsername = dbUsername;
        return this;
    }

    public JmReportDataSource setDbPassword(String dbPassword) {
        this.dbPassword = dbPassword;
        return this;
    }

    public JmReportDataSource setCreateBy(String createBy) {
        this.createBy = createBy;
        return this;
    }

    @JsonFormat(
            timezone = "GMT+8",
            pattern = "yyyy-MM-dd HH:mm:ss"
    )
    public JmReportDataSource setCreateTime(Date createTime) {
        this.createTime = createTime;
        return this;
    }

    public JmReportDataSource setUpdateBy(String updateBy) {
        this.updateBy = updateBy;
        return this;
    }

    @JsonFormat(
            timezone = "GMT+8",
            pattern = "yyyy-MM-dd HH:mm:ss"
    )
    public JmReportDataSource setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
        return this;
    }

    @Override
    public String toString() {
        return "JmReportDataSource(id=" + this.getId() + ", code=" + this.getCode() + ", name=" + this.getName() + ", reportId=" + this.getReportId() + ", remark=" + this.getRemark() + ", dbType=" + this.getDbType() + ", dbDriver=" + this.getDbDriver() + ", dbUrl=" + this.getDbUrl() + ", dbUsername=" + this.getDbUsername() + ", dbPassword=" + this.getDbPassword() + ", createBy=" + this.getCreateBy() + ", createTime=" + this.getCreateTime() + ", updateBy=" + this.getUpdateBy() + ", updateTime=" + this.getUpdateTime() + ")";
    }

    @Override
    public boolean equals(Object o) {
        if (o == this) {
            return true;
        } else if (!(o instanceof JmReportDataSource)) {
            return false;
        } else {
            JmReportDataSource var2 = (JmReportDataSource)o;
            if (!var2.canEqual(this)) {
                return false;
            } else {
                String var3 = this.getId();
                String var4 = var2.getId();
                if (var3 == null) {
                    if (var4 != null) {
                        return false;
                    }
                } else if (!var3.equals(var4)) {
                    return false;
                }

                String var5 = this.getCode();
                String var6 = var2.getCode();
                if (var5 == null) {
                    if (var6 != null) {
                        return false;
                    }
                } else if (!var5.equals(var6)) {
                    return false;
                }

                String var7 = this.getName();
                String var8 = var2.getName();
                if (var7 == null) {
                    if (var8 != null) {
                        return false;
                    }
                } else if (!var7.equals(var8)) {
                    return false;
                }

                label158: {
                    String var9 = this.getReportId();
                    String var10 = var2.getReportId();
                    if (var9 == null) {
                        if (var10 == null) {
                            break label158;
                        }
                    } else if (var9.equals(var10)) {
                        break label158;
                    }

                    return false;
                }

                label151: {
                    String var11 = this.getRemark();
                    String var12 = var2.getRemark();
                    if (var11 == null) {
                        if (var12 == null) {
                            break label151;
                        }
                    } else if (var11.equals(var12)) {
                        break label151;
                    }

                    return false;
                }

                String var13 = this.getDbType();
                String var14 = var2.getDbType();
                if (var13 == null) {
                    if (var14 != null) {
                        return false;
                    }
                } else if (!var13.equals(var14)) {
                    return false;
                }

                label137: {
                    String var15 = this.getDbDriver();
                    String var16 = var2.getDbDriver();
                    if (var15 == null) {
                        if (var16 == null) {
                            break label137;
                        }
                    } else if (var15.equals(var16)) {
                        break label137;
                    }

                    return false;
                }

                label130: {
                    String var17 = this.getDbUrl();
                    String var18 = var2.getDbUrl();
                    if (var17 == null) {
                        if (var18 == null) {
                            break label130;
                        }
                    } else if (var17.equals(var18)) {
                        break label130;
                    }

                    return false;
                }

                String var19 = this.getDbUsername();
                String var20 = var2.getDbUsername();
                if (var19 == null) {
                    if (var20 != null) {
                        return false;
                    }
                } else if (!var19.equals(var20)) {
                    return false;
                }

                String var21 = this.getDbPassword();
                String var22 = var2.getDbPassword();
                if (var21 == null) {
                    if (var22 != null) {
                        return false;
                    }
                } else if (!var21.equals(var22)) {
                    return false;
                }

                label109: {
                    String var23 = this.getCreateBy();
                    String var24 = var2.getCreateBy();
                    if (var23 == null) {
                        if (var24 == null) {
                            break label109;
                        }
                    } else if (var23.equals(var24)) {
                        break label109;
                    }

                    return false;
                }

                label102: {
                    Date var25 = this.getCreateTime();
                    Date var26 = var2.getCreateTime();
                    if (var25 == null) {
                        if (var26 == null) {
                            break label102;
                        }
                    } else if (var25.equals(var26)) {
                        break label102;
                    }

                    return false;
                }

                String var27 = this.getUpdateBy();
                String var28 = var2.getUpdateBy();
                if (var27 == null) {
                    if (var28 != null) {
                        return false;
                    }
                } else if (!var27.equals(var28)) {
                    return false;
                }

                Date var29 = this.getUpdateTime();
                Date var30 = var2.getUpdateTime();
                if (var29 == null) {
                    if (var30 != null) {
                        return false;
                    }
                } else if (!var29.equals(var30)) {
                    return false;
                }

                return true;
            }
        }
    }

    protected boolean canEqual(Object other) {
        return other instanceof JmReportDataSource;
    }

    @Override
    public int hashCode() {
        boolean var1 = true;
        byte var2 = 1;
        String var3 = this.getId();
        int var17 = var2 * 59 + (var3 == null ? 43 : var3.hashCode());
        String var4 = this.getCode();
        var17 = var17 * 59 + (var4 == null ? 43 : var4.hashCode());
        String var5 = this.getName();
        var17 = var17 * 59 + (var5 == null ? 43 : var5.hashCode());
        String var6 = this.getReportId();
        var17 = var17 * 59 + (var6 == null ? 43 : var6.hashCode());
        String var7 = this.getRemark();
        var17 = var17 * 59 + (var7 == null ? 43 : var7.hashCode());
        String var8 = this.getDbType();
        var17 = var17 * 59 + (var8 == null ? 43 : var8.hashCode());
        String var9 = this.getDbDriver();
        var17 = var17 * 59 + (var9 == null ? 43 : var9.hashCode());
        String var10 = this.getDbUrl();
        var17 = var17 * 59 + (var10 == null ? 43 : var10.hashCode());
        String var11 = this.getDbUsername();
        var17 = var17 * 59 + (var11 == null ? 43 : var11.hashCode());
        String var12 = this.getDbPassword();
        var17 = var17 * 59 + (var12 == null ? 43 : var12.hashCode());
        String var13 = this.getCreateBy();
        var17 = var17 * 59 + (var13 == null ? 43 : var13.hashCode());
        Date var14 = this.getCreateTime();
        var17 = var17 * 59 + (var14 == null ? 43 : var14.hashCode());
        String var15 = this.getUpdateBy();
        var17 = var17 * 59 + (var15 == null ? 43 : var15.hashCode());
        Date var16 = this.getUpdateTime();
        var17 = var17 * 59 + (var16 == null ? 43 : var16.hashCode());
        return var17;
    }
}

